import logging,yagmail
from BeautifulReport import BeautifulReport
class tool():
    def log(self):
        log=logging.basicConfig(level=logging.DEBUG,
                                format='%(levelname)s->%(filename)s->%(asctime)s->%(lineno)d',
                                filemode='a+',
                                filename='a3mallceshi.log')
        return log

    def send_email(self,filename):
        send=yagmail.SMTP(user='3177622011@qq.com',password='xjwzrxaryqjydece',host='smtp.qq.com')
        send.send(to='3177622011@qq.com',subject='吖城内我去年',attachments=filename,contents='男主叫四强')

    def baogao(self,suite):
        BeautifulReport(suite).report(filename='AAA.html',description='大葱拌豆腐')